<?php

namespace app\api\validate;

use think\Validate;

class Register extends Validate{
    protected $rule = [
        'mobile' => 'require|mobile',
        'sm_code' => 'require',
        'code' => 'require',
        'password_confirm' => 'require|length:6,18',
        'password' => 'require|confirm',
    ];

    protected $message = [
        'mobile' => '手机号码格式错误',
        'sm_code' => '请输入手机验证码',
        'code' => '请输入推荐码',
        'password' => '两次密码不一致',
        'r_password' => '密码格式错误'
    ];

    protected $scene = [
        'register' => ['mobile','sm_code','code','password_confirm','password'],
        'forget' => ['mobile','sm_code','password_confirm','password']
    ];

}







